package com.app.twth.ui.news;


import com.app.twth.app.Constant;
import com.app.twth.base.BaseModel;
import com.app.twth.bean.BaseResponseEntity;
import com.app.twth.net.JsonCallBack;
import com.app.twth.ui.adjust.remeasure.ReMeasureQr;
import com.app.twth.utils.GsonUtil;
import com.lzy.okgo.OkGo;

public class NewsDataModel extends BaseModel {
    public <T> void taskPendingList(JsonCallBack jsonCallBack) {
        OkGo.<BaseResponseEntity<T>>get(Constant.taskPendingList)
                .tag(this)
                .execute(jsonCallBack);
    }

    public <T> void tallyReCheckInfo(String id, JsonCallBack jsonCallBack) {
        OkGo.<BaseResponseEntity<T>>get(Constant.tallyReCheckInfo + "/" + id)
                .tag(this)
                .execute(jsonCallBack);
    }

    public <T> void tallyReTally(String taskId, JsonCallBack jsonCallBack) {
        OkGo.<BaseResponseEntity<T>>get(Constant.tallyReTallyInfo + "/" + taskId)
                .tag(this)
                .execute(jsonCallBack);
    }
    public <T> void damageProcessInfo(String taskId, JsonCallBack jsonCallBack) {
        OkGo.<BaseResponseEntity<T>>get(Constant.damageProcessInfo + "/" + taskId)
                .tag(this)
                .execute(jsonCallBack);
    }

    public <T> void tallyReMeasure(ReMeasureQr reMeasureQr, JsonCallBack jsonCallBack) {
        OkGo.<BaseResponseEntity<T>>post(Constant.tallyReMeasure)
                .tag(this)
                .upJson(GsonUtil.toJson(reMeasureQr))
                .execute(jsonCallBack);
    }

    public <T> void returnFinalProcessItem(String batchNo, String ibLpn, JsonCallBack jsonCallBack) {
        OkGo.<BaseResponseEntity<T>>get(Constant.returnFinalProcessItem + "/" + batchNo + "/" + ibLpn)
                .tag(this)
                .execute(jsonCallBack);
    }

}